<template>
	<view>
		<view class="bind_page_tip">为了保障账户的安全请绑定手机</view>
		<view class="bind_page_tip1">{{mobile}}</view>
		<view class="bind_page_tip2">当前已绑定</view>
		<view class="bind_page_btn" hover-class="hover_class" @click="goBind()">绑定其他手机号</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				mobile:'',
			};
		},
		onLoad() {
			var a = this
			a.getUserInfo()
		},
		methods:{
			goBind(){
				uni.navigateTo({
					url:'/pages/user/editPhone'
				})
			},
			getUserInfo(){
				var a =this
				uni.showLoading({
					title:'加载中'
				})
				a.globalajax('user/info',{
					},'GET',function(res) {
						console.log(res);
						uni.hideLoading()
						uni.stopPullDownRefresh()
						if(res.data.code==200){
							var mobile = res.data.data.info.mobile
							a.mobile = mobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2');
						}else{
							a.$showModal({
								title:'友情提示',
								content:res.data.msg,
								showCancel:false,
								confirmText:'我知道了',
								success: (res) => {
								}
							});
						}
					}
				);
			},
		}
	}
</script>

<style lang="scss">
.bind_page_tip{
	text-align: center;
	color: #000;
	font-size: 28rpx;
	padding-top: 80rpx;
}
.bind_page_tip1{
	text-align: center;
	color: #000;
	font-size: 64rpx;
	padding-top: 14rpx;
}
.bind_page_tip2{
	text-align: center;
	color: rgba(144, 147, 153, 1);
	font-size: 24rpx;
	padding-top: 20rpx;
}
.bind_page_btn{
	width: 686rpx;
	height: 80rpx;
	border-radius: 12rpx;
	background: rgba(65, 138, 255, 0.1);
	display: flex;
	justify-content: center;
	align-items: center;
	color:rgba(65, 138, 255, 1);
	margin: 0 auto;
	font-size: 28rpx;
	margin-top: 80rpx;
}
</style>
